package com.rcoming.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;

import java.util.List;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rcoming.R;
import com.rcoming.model.HotMovieBean;

/**
 * Created by mjb on 2017/4/14.
 */

public class HotMovieAdapter extends BaseQuickAdapter<HotMovieBean.EntriesBean, BaseViewHolder> {
    public HotMovieAdapter(List<HotMovieBean.EntriesBean> mList) {
        super(R.layout.item_hot_movie, mList);
    }

    @Override
    protected void convert(BaseViewHolder viewHolder, HotMovieBean.EntriesBean item) {
        viewHolder.setText(R.id.tv_title, item.getTitle());
        Glide.with(mContext)
                .load(item.getImages().getLarge())
                .crossFade()
                .into((ImageView) viewHolder.getView(R.id.img_image));

    }

}
